package jm.java.syncOptimize;

/**
 * @Description synchronized 优化 —— 轻量级锁
 * @date 2022/3/30 15:11
 */
public class LightLock {
    static Object obj = new Object();

    public static void method1(){
        synchronized (obj){
            method2();
        }
    }

    public static void method2(){
        synchronized (obj){

        }
    }
}
